package com.techwells.applicationMarket.service;

import org.springframework.transaction.annotation.Transactional;

import com.techwells.applicationMarket.domain.Message;
import com.techwells.applicationMarket.util.PagingTool;

@Transactional
public interface MessageService {
	
	Object addMessage(Message message)throws Exception;
	
	
	Object getMessage(Integer messageId,Integer userId)throws Exception;


	Object getMessageList(PagingTool pagingTool)throws Exception;


	/**
	 * 删除消息
	 * @param messageId
	 * @return
	 */
	Object delete(Integer messageId)throws Exception;


	/**
	 * 修改消息
	 * @param message
	 * @return
	 * @throws Exception
	 */
	Object modify(Message message)throws Exception;


	/**
	 * 用户删除消息
	 * @param userId
	 * @param messageId
	 * @return
	 */
	Object deleteMessageByUserId(Integer userId, Integer messageId);


	/**
	 * 用户分页获取消息列表
	 * @param pagingTool
	 * @return
	 */
	Object getMessageListByUserId(PagingTool pagingTool);


	/**
	 * 获取消息总数
	 * @param userId
	 * @return
	 */
	Object getMessageTotal(Integer userId);
}
